package com.sljy.hzk.net;

import java.util.List;

/**
 * Created  on 2018/6/25 0025
 *
 * @author 唐开阔
 * @describe
 */
public class CommonResult<T> {

    /**
     * msg : 登录成功
     * menuList : []
     * user : {"allPId":[],"comPId":5,"partitionId":null,"roleId":null,"cpId":null,"userId":10,"username":"app测试"}
     * status : 1
     */

    private String msg;
    private T data;
    private String code;

    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public boolean isSuccessful(){
        return code.equals(HttpConfig.RESPONSE_OK);
    }

    @Override
    public String toString() {
        return "CommonResult{" +
                "msg='" + msg + '\'' +
                ", data=" + data +
                ", code='" + code + '\'' +
                '}';
    }
}
